<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>ll_newscms</title>

    <script src="__STATIC__/jquery-2.js"></script>
    <script src="__STATIC__/layui/layui.js"></script>
    <link rel="stylesheet" href="__STATIC__/layui/css/layui.css">
</head>
<body class="layui-layout-body">
<div class="layui-layout layui-layout-admin">

    {include file="public/header" /}
    {include file="public/left" /}
    <style>
        .layui-table-cell{
            height: 33px;
        }
    </style>



    <div class="layui-body">
        <!-- 内容主体区域 -->
        <div style="padding: 15px;">


            <fieldset class="layui-elem-field layui-field-title"  style="margin-top: 50px;">
                <legend>收藏列表</legend>
            </fieldset>
            <table class="layui-hide" id="test"></table>




            <script>
                layui.use('table', function(){
                    var table = layui.table;

                    table.render({
                        elem: '#test'
                        ,url:"{:url('collection/Collectionjson')}"
                        ,cols: [[
                            {type:'checkbox', width:'10%'}
                            ,{field:'ll_coid', width:'10%',  title: 'ID', sort: true}
                            ,{field:'ll_username', width:'25%',   title: '用户名'}
                            ,{field:'ll_title', width:'30%',   title: '新闻标题'}

                            ,{field:'操作', width:'24%', title: '操作',templet: '#operation'}

                        ]]
                        ,page: true
                    });
                });
            </script>
            <script type="text/html" id="operation">

                <a class="layui-btn layui-btn-danger delbtn"  onclick=" return confirm('你真的要删除这个评论吗')" href="{:url('collection/delete' )}?{literal}ll_coid={{d.ll_coid}} {/literal}" >删除</a>
            </script>


        </div>
    </div>


</div>

<script>

    //JavaScript代码区域
    layui.use('element', function(){
        var element = layui.element;

    });
    $('#logout').click(function (e) {
        e.preventDefault();
        layui.use('layer', function(){
            var layer = layui.layer;

            layer.confirm('你真的要退出吗？',['yes','no'],function () {
                location.href="{:url('login/logout')}";
            },function () {
                
            })
        });
    })





</script>

</body>
</html>